﻿using System;
using System.Collections.Generic;
using System.Text;
using HAVNet.Core.String;


namespace HAVNet.Intros.AST
{
    public class ASTArguments : List<ASTArgument>
    {
        public override string ToString ()
        {
            return Strings.joinobjs (", ", this);
        }
    }

    public class ASTArgument : ASTNode
    {
        public bool             isRef       { get; set; }
        public bool             isOut       { get; set; }
        public ASTExpr          expression  { get; set; }

        public override string ToString ()
        {
            string ret = "";

            if      (isRef) ret += " ref ";
            else if (isOut) ret += " out ";

            ret += expression.ToString ();

            return ret;
        }
    }
}
